<template>
    <el-image :initial-index="0" :preview-src-list="imgList && imgList.length > 0 ? imgList : [src]" :zoom-rate="1.2"
        class="comment-image" :src="src" fit="scale-down" loading="lazy" hide-on-click-modal>
    </el-image>
</template>

<script setup>
const props = defineProps({
    src: {
        type: String,
        required: true
    },
    imgList: {
        type: Array,
        default: () => []
    }
})
</script>

<style lang="scss" scoped>
.comment-image {
    width: 80px;
    height: 80px;
    background: #eee;
}
</style>